package com.demo.test1.service.impl;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class LogServiceProxy implements InvocationHandler {
    private Object obj;

    public LogServiceProxy(Object obj) {
        this.obj = obj;
    }

    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        System.out.println(method.getName()+"开始");
        method.invoke(obj,args);
        System.out.println(method.getName()+"结束");
        return null;
    }
}
